import request from '@/utils/request'

let getData = {}
getData.url = 'https://cdn1-open.mokyun.com/'
// banner图
getData.getBanner = () => {
  return request({
    url: 'lvxin/banner',
    method: 'get'
  })
}
//产品分类
getData.getProductsCategory = () => {
  return request({
    url: 'lvxin/product/category',
    method: 'get'
  })
}

//首页产品推荐
getData.getRecommend = () => {
  return request({
    url: 'lvxin/recommended/products',
    method: 'get'
  })
}


//产品详情
getData.getProductDetails = (pro_id) => {
  return request({
    url: `lvxin/product/detail/${pro_id}`,
    method: 'get'
  })
}

//全部产品
getData.getAllProducts = (page) => {
  return request({
    url: `lvxin/product/all/list/${page}`,
    method: 'get'
  })
}

//产品分类列表
getData.getCateProducts = (cate_id, page_id) => {
  return request({
    url: `lvxin/product/list/${cate_id}/${page_id}`,
    method: 'get'
  })
}
//首页案例展示
getData.getIndexCases = () => {
  return request({
    url: "lvxin/recommended/case",
    method: 'get'
  })
}
//首页知识展示
getData.getIndexKnowledge = () => {
  return request({
    url: "lvxin/recommended/knowledge",
    method: 'get'
  })
}
//环保知识
getData.getAllKnowledge = (page) => {
  return request({
    url: `lvxin/knowledge/all/list/${page}`,
    method: 'get'
  })
}
//公司简介关于我们
getData.getAbout = () => {
  return request({
    url: "lvxin/company/about",
    method: 'get'
  })
}
//公司简介研发体系
getData.getDevelopment = () => {
  return request({
    url: "lvxin/company/development",
    method: 'get'
  })
}
//公司简介公司荣耀
getData.getHonor = () => {
  return request({
    url: "lvxin/company/honor",
    method: 'get'
  })
}
//公司简介公司文化
getData.getCulture = () => {
  return request({
    url: "lvxin/company/culture",
    method: 'get'
  })
}
//案例展示
getData.getCases = () => {
  return request({
    url: "lvxin/case/all/list",
    method: 'get'
  })
}

//案例详情
getData.getCaseDetails = (case_id) => {
  return request({
    url: `lvxin/case/detail/${case_id}`,
    method: 'get'
  })
}
//知识详情
getData.getKnowledgeDetails = (knowledge_id) => {
  return request({
    url: `lvxin/knowledge/detail/${knowledge_id}`,
    method: 'get'
  })
}
//首页公司简介
getData.getIndex = () => {
  return request({
    url: `lvxin/company/index`,
    method: 'get'
  })
}
//联系我们选项
getData.getType = () => {
  return request({
    url: `lvxin/product/type`,
    method: 'get'
  })
}

// 联系我们提交
getData.submitContent = (obj) => {
  return request({
    url: 'lvxin/contact',
    method: 'post',
    data: obj
  })
}

export default getData
